@(sortBy: String, list: List[Corporation])(implicit request: RequestHeader)

@import utils._

@prettyGrade(grade: String) = @{
  grade match {
    case "0" => "10人以下"
    case "1" => "10-100人"
    case "2" => "100-500人"
    case "3" => "500-1000人"
    case "4" => "1000人以上"
    case _ => "-"
  }
}
<!DOCTYPE html>
<html style="background-color: #e2e2e2;">
<head>
    <meta charset="utf-8">
    <meta name="keywords" content="{{ lay.base.keywords }}">
    <meta name="description" content="{{ lay.base.description }}">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>发现 Scala 技术栈公司</title>
    <link rel="stylesheet" href="/assets/fly3/res/layui/css/layui.css">
    <link rel="stylesheet" href="/assets/fly3/res/css/global.css">
    <style>
  .header{border-bottom: 1px solid #404553; border-right: 1px solid #404553;}
  </style>
</head>
<body class="fly-full">

<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/">
            <img src="/assets/images/logo.png" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs" style="padding-left: 30px;">
            <li class='layui-nav-item'>
                <a href="/"><i class="iconfont icon-jiaoliu"></i>交流</a>
            </li>
            <li class='layui-nav-item'>
                <a href="/docs"><i class="iconfont icon-iconmingxinganli"></i>学习</a>
            </li>
            <li class='layui-nav-item'>
                <a href="/dict"><i class="layui-icon layui-icon-read"></i>词典</a>
            </li>
            <li class='layui-nav-item layui-this'>
                <a href="/corporations"><i class="iconfont icon-logo"></i>圈子</a>
            </li>
            <li class='layui-nav-item'>
                <a href="https://github.com/playcommunity/play-community" target="_blank"><i class="iconfont icon-daima"></i>源码</a>
            </li>
        </ul>
    </div>
</div>

<div class="fly-case-header">
    <p class="fly-case-year" style="top:70px;">发现 Scala 技术栈公司</p>
    <div class="fly-case-btn">
        <a href="javascript:;" class="layui-btn layui-btn-big fly-case-active" data-type="push">提交公司</a>
    </div>
</div>

<div class="fly-main" style="overflow: hidden;">
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li @if(sortBy == "vote"){class="layui-this"}><a href="/corporations?sortBy=vote">按点赞排行</a></li>
            <li @if(sortBy == "time"){class="layui-this"}><a href="/corporations?sortBy=time">按提交时间</a></li>
        </ul>
    </div>
    <ul class="fly-case-list" style="padding-top: 30px;">
        @for(c <- list){
        <li data-id="@c._id">
            <a class="fly-case-img" href="@c.url" target="_blank" >
                <img src="@c.logo" alt="@c.title">
                <cite class="layui-btn layui-btn-primary layui-btn-small">去围观</cite>
            </a>
            <h2 title="@prettyGrade(c.grade)"><a href="@c.url" target="_blank">@c.title</a></h2>
            <p class="fly-case-desc" title="@c.description">@c.description</p>
            <div class="fly-case-info">
                <a href="/user/home?uid=@{c.author._id}" class="fly-case-user" target="_blank"><img src="@c.author.headImg"></a>
                <p class="layui-elip" style="font-size: 12px;"><span style="color: #666;">@c.author.name</span> @utils.DateTimeUtil.toPrettyString(c.createTime)</p>
                <p>
                    获得<a class="fly-case-nums fly-case-active" href="javascript:;" style=" padding:0 5px; color: #01AAED;">@c.voteStat.count</a>个赞
                </p>
                @if(RequestHelper.isLogin && utils.BitmapUtil.fromBase64String(c.voteStat.bitmap).contains(RequestHelper.getUid.toInt)){
                <button class="layui-btn  fly-case-active" data-type="praise">已赞</button>
                }else{
                <button class="layui-btn layui-btn-primary fly-case-active" data-type="praise">点赞</button>
                }
            </div>
        </li>
        }
    </ul>

</div>

<div class="fly-footer">
    <p> <span id="footer-copyright">2018</span> &copy; <a href="http://www.playscala.cn/" target="_blank">PlayScala 社区</a>
           <a href="http://www.miitbeian.gov.cn" target="_blank">苏ICP备14005538号-1</a></p>

    <!--<p>
        <a href="https://github.com/playcommunity/play-community" target="_blank">社区源码</a>
        <a href="" target="_blank">微信公众号</a>
    </p>-->
</div>

<script src="/assets/fly3/res/layui/layui.js"></script>
<script src="/assets/js/jquery.js"></script>
<script src="/assets/js/copyright.js"></script>

<script>
layui.cache.page = 'case';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '/assets/fly3/res/mods/' //这里实际使用时，建议改成绝对路径
}).extend({
  fly: 'index'
}).use('fly');
</script>
</body>
</html>